<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.8" />
<link rel="Shortcut Icon" href="/images/favicon.ico" type="image/x-icon" />
<title></title>
<link rel="stylesheet" href="asciidoc-1.css" tppabs="http://old.peachfuzzer.com/v3/asciidoc.css" type="text/css" />
<link rel="stylesheet" href="website-1.css" tppabs="http://old.peachfuzzer.com/v3/website.css" type="text/css" />
</head>

<body>

<div id="layout-menu-box">
<div id="layout-menu">
  <div><a href="WhatIsPeach.html" tppabs="http://old.peachfuzzer.com/WhatIsPeach.html">What is Peach</a></div>
  <div><a href="Installation.html" tppabs="http://old.peachfuzzer.com/v3/Installation.html"><b>Installing</b></a></div>
  <div><a href="PeachQuickStart.html" tppabs="http://old.peachfuzzer.com/v3/PeachQuickStart.html"><b>Tutorials</b></a></div>
  <div><a href="Methodology.html" tppabs="http://old.peachfuzzer.com/Methodology.html">Methodology</a></div>
  <div><a href="Introduction.html" tppabs="http://old.peachfuzzer.com/Introduction.html">Introduction</a></div>
  <div><a href="Training.html" tppabs="http://old.peachfuzzer.com/Training.html">Training</a></div>
  <div><a href="javascript:if(confirm(%27http://www.dejavusecurity.com/peach.html  \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://www.dejavusecurity.com/peach.html%27" tppabs="http://www.dejavusecurity.com/peach.html">Enterprise</a></div>
  <div><a href="FAQ.html" tppabs="http://old.peachfuzzer.com/v3/FAQ.html">FAQ</a></div>
  <div><a href="javascript:if(confirm(%27http://forums.peachfuzzer.com/forum.php  \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://forums.peachfuzzer.com/forum.php%27" tppabs="http://forums.peachfuzzer.com/forum.php">Support Forums</a></div>

  <div><h5>Peach 3</h5></div>
  <div><img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="PeachPit.html" tppabs="http://old.peachfuzzer.com/v3/PeachPit.html">Peach Pits</a></div>
  <div>&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="GeneralConfiguration.html" tppabs="http://old.peachfuzzer.com/v3/GeneralConfiguration.html">General Conf</a></div>
  <div>&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="DataModeling.html" tppabs="http://old.peachfuzzer.com/v3/DataModeling.html">Data Modeling</a></div>
  <div>&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="StateModel.html" tppabs="http://old.peachfuzzer.com/v3/StateModel.html">State Modeling</a></div>
  <div>&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="AgentsMonitors.html" tppabs="http://old.peachfuzzer.com/v3/AgentsMonitors.html">Agents</a></div>
  <div>&nbsp;&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="AgentsMonitors.html" tppabs="http://old.peachfuzzer.com/v3/AgentsMonitors.html">Monitors</a></div>
  <div>&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="TestConfig.html" tppabs="http://old.peachfuzzer.com/v3/TestConfig.html">Test</a></div>
        <div>&nbsp;&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="Publisher.html" tppabs="http://old.peachfuzzer.com/v3/Publisher.html">Publishers</a></div>
  <div>&nbsp;&nbsp;<img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="Logger.html" tppabs="http://old.peachfuzzer.com/v3/Logger.html">Loggers</a></div>
  <!-- <div>&nbsp;<img src="/images/1.gif" /><a href="/v3/DebuggingPitFiles.html">Debugging Pits</a></div> -->
  <!-- <div>&nbsp;<img src="/images/1.gif" /><a href="/v3/ValidatingPitFiles.html">Validating Pits</a></div> -->
  <div><img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="RunningPeach.html" tppabs="http://old.peachfuzzer.com/v3/RunningPeach.html">Running</a></div>
  <!-- <div><img src="/images/1.gif" /><a href="/v3/ParallelPeach.html">Parallel</a></div> -->
  <!-- <div><img src="/images/1.gif" /><a href="/v3/ExtendingPeach.html">Extending</a></div> -->
  <div><img src="1.gif" tppabs="http://old.peachfuzzer.com/images/1.gif" /><a href="minset.html" tppabs="http://old.peachfuzzer.com/v3/minset.html">Minset</a></div>

  <div><h5><a href="peach23.html" tppabs="http://old.peachfuzzer.com/v2/peach23.html">Peach 2.3</a></h5></div>

  <div><hr/></div>

  <div><a href="License.html" tppabs="http://old.peachfuzzer.com/License.html">License</a></div>
</div>
</div>
<div id="layout-content-box">
<div id="layout-banner">
  <div id="layout-title">
    <a href="index.htm" tppabs="http://old.peachfuzzer.com/"><img src="peach_fuzzer.png" tppabs="http://old.peachfuzzer.com/images/peach_fuzzer.png" height="100" /></a>
    <a href="javascript:if(confirm(%27http://www.dejavusecurity.com/peach.html  \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://www.dejavusecurity.com/peach.html%27" tppabs="http://www.dejavusecurity.com/peach.html" class="layout-inner-banner-right">
                <img height="50" src="dejavusecurity.png" tppabs="http://old.peachfuzzer.com/images/dejavusecurity.png" /></a>
  </div>

  <div id="layout-description">
  <script>
  (function() {
    var cx = '007028538774543840348:g-0dlrdlmxs';
    var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:search></gcse:search>
      </div>
</div>
<div id="layout-content">
<div id="content">
<div class="sect1">
<h2 id="_number">Number</h2>
<div class="sectionbody">
<div class="paragraph"><p>The Number element defines a binary number of lengths 8, 16, 24, 32, or 64 bits.  The Number element is a child element of <a href="DataModel.html" tppabs="http://old.peachfuzzer.com/v3/DataModel.html">DataModel</a>, <a href="Block.html" tppabs="http://old.peachfuzzer.com/v3/Block.html">Block</a>, or <a href="Choice.html" tppabs="http://old.peachfuzzer.com/v3/Choice.html">Choice</a>.</p></div>
<div class="sect2">
<h3 id="_attributes">Attributes:</h3>
<div class="ulist"><ul>
<li>
<p>
<a href="name.html" tppabs="http://old.peachfuzzer.com/v3/name.html">name</a>&#8201;&#8212;&#8201;[Required] Name of the number.
</p>
</li>
<li>
<p>
<a href="size.html" tppabs="http://old.peachfuzzer.com/v3/size.html">size</a>&#8201;&#8212;&#8201;[Required] Size of number in bits.  Valid options are 1 through 64.
</p>
</li>
<li>
<p>
<a href="value.html" tppabs="http://old.peachfuzzer.com/v3/value.html">value</a>&#8201;&#8212;&#8201;The default value to assign to the number.
</p>
</li>
<li>
<p>
<a href="valueType.html" tppabs="http://old.peachfuzzer.com/v3/valueType.html">valueType</a>&#8201;&#8212;&#8201;The representation of the value.  Valid options are string and hex. [Optional]
</p>
</li>
<li>
<p>
<a href="token.html" tppabs="http://old.peachfuzzer.com/v3/token.html">token</a>&#8201;&#8212;&#8201;This element is treated as a token when parsing, defaults to False Valid options true and false.
</p>
</li>
<li>
<p>
<a href="endian.html" tppabs="http://old.peachfuzzer.com/v3/endian.html">endian</a>&#8201;&#8212;&#8201;Byte order of the number, defaults to little. Valid options are big, little, and network. Network is the same as big.
</p>
</li>
<li>
<p>
<a href="signed.html" tppabs="http://old.peachfuzzer.com/v3/signed.html">signed</a>&#8201;&#8212;&#8201; The number is signed or unsigned, defaults to true. Valid options are true and false.
</p>
</li>
<li>
<p>
<a href="constraint.html" tppabs="http://old.peachfuzzer.com/v3/constraint.html">constraint</a>&#8201;&#8212;&#8201;A constraint in the form of a python expression.  Used during data cracking.
</p>
</li>
<li>
<p>
<a href="mutable.html" tppabs="http://old.peachfuzzer.com/v3/mutable.html">mutable</a>&#8201;&#8212;&#8201;Is data element changeable (should it be mutated during fuzzing), defaults to true. Valid options true and false.
</p>
</li>
<li>
<p>
<a href="minOccurs.html" tppabs="http://old.peachfuzzer.com/v3/minOccurs.html">minOccurs</a>&#8201;&#8212;&#8201;The minimum number of times this number must occur. Defaults to 1. Valid options are a positive integer value.
</p>
</li>
<li>
<p>
<a href="maxOccurs.html" tppabs="http://old.peachfuzzer.com/v3/maxOccurs.html">maxOccurs</a>&#8201;&#8212;&#8201;The maximum number of times this number can occur. No default. Valid options are a positive integer value.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_valid_child_elements">Valid Child-Elements:</h3>
<div class="ulist"><ul>
<li>
<p>
<a href="Analyzers-1.html" tppabs="http://old.peachfuzzer.com/v3/Analyzers.html">Anayzers</a>
</p>
</li>
<li>
<p>
<a href="Fixup.html" tppabs="http://old.peachfuzzer.com/v3/Fixup.html">Fixup</a>
</p>
</li>
<li>
<p>
<a href="Relation.html" tppabs="http://old.peachfuzzer.com/v3/Relation.html">Relation</a>
</p>
</li>
<li>
<p>
<a href="Transformer.html" tppabs="http://old.peachfuzzer.com/v3/Transformer.html">Transformer</a>
</p>
</li>
<li>
<p>
<a href="Hint.html" tppabs="http://old.peachfuzzer.com/v3/Hint.html">Hint</a>
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_examples">Examples:</h3>
<div class="paragraph"><p>A simple number example this will produce a 32 bit (4 byte) number with a default value of 5.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample1"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"5"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"32"</span><span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
<div class="paragraph"><p>To only use 16 bits (two byte) change the size to 16.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample2"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"5"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"16"</span><span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
<div class="sect3">
<h4 id="_signed">Signed</h4>
<div class="paragraph"><p>To indicate this is an unsigned data element set the signed attribute equal to "false". The default is true.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample3"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"5"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"32"</span> <span style="color: #009900">signed</span><span style="color: #990000">=</span><span style="color: #FF0000">"false"</span><span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
</div>
<div class="sect3">
<h4 id="_value_type">Value Type:</h4>
<div class="paragraph"><p>The valueType defines how to interprete the value attribute. Valid options are string and hex. The default is string.</p></div>
<div class="paragraph"><p>To assign a value of 1000 to Hi5.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample4"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"1000"</span> <span style="color: #009900">valueType</span><span style="color: #990000">=</span><span style="color: #FF0000">"string"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"16"</span> <span style="color: #009900">signed</span><span style="color: #990000">=</span><span style="color: #FF0000">"false"</span> <span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
<div class="paragraph"><p>To assign a value of 43981 in hex.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample5"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"AB CD"</span> <span style="color: #009900">valueType</span><span style="color: #990000">=</span><span style="color: #FF0000">"hex"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"16"</span> <span style="color: #009900">signed</span><span style="color: #990000">=</span><span style="color: #FF0000">"false"</span> <span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
</div>
<div class="sect3">
<h4 id="_endian">Endian</h4>
<div class="paragraph"><p>To change the endianness of the number set the endian attribute. Endianness defines in which order the bytes are the least or most significant.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample6"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"AB CD"</span> <span style="color: #009900">valueType</span><span style="color: #990000">=</span><span style="color: #FF0000">"hex"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"16"</span> <span style="color: #009900">signed</span><span style="color: #990000">=</span><span style="color: #FF0000">"false"</span> <span style="color: #009900">endian</span><span style="color: #990000">=</span><span style="color: #FF0000">"big"</span> <span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
<div class="paragraph"><p>Will produce the bytes in the following order.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> AB CD</code></pre>
</div></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">&lt;DataModel</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"NumberExample7"</span><span style="font-weight: bold"><span style="color: #0000FF">&gt;</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">&lt;Number</span></span> <span style="color: #009900">name</span><span style="color: #990000">=</span><span style="color: #FF0000">"Hi5"</span> <span style="color: #009900">value</span><span style="color: #990000">=</span><span style="color: #FF0000">"AB CD"</span> <span style="color: #009900">valueType</span><span style="color: #990000">=</span><span style="color: #FF0000">"hex"</span> <span style="color: #009900">size</span><span style="color: #990000">=</span><span style="color: #FF0000">"16"</span> <span style="color: #009900">signed</span><span style="color: #990000">=</span><span style="color: #FF0000">"false"</span> <span style="color: #009900">endian</span><span style="color: #990000">=</span><span style="color: #FF0000">"little"</span> <span style="font-weight: bold"><span style="color: #0000FF">/&gt;</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">&lt;/DataModel&gt;</span></span></tt></pre></div></div>
<div class="paragraph"><p>Will produce the bytes in the following order.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> CD AB</code></pre>
</div></div>
</div>
</div>
</div>
</div>
</div>
<div id="footnotes"></div>
<div id="footer">
<div id="footer-text">

<table width="100%">
<td><td>
<a href="javascript:if(confirm(%27http://dejavusecurity.com/  \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://dejavusecurity.com/%27" tppabs="http://dejavusecurity.com/"><img src="dejavusecurity.png" tppabs="http://old.peachfuzzer.com/images/dejavusecurity.png" height="50"/></a>
</td><td>&nbsp;&nbsp;&nbsp;</td><td>

Copyright (c) <a href="javascript:if(confirm(%27http://dejavusecurity.com/  \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://dejavusecurity.com/%27" tppabs="http://dejavusecurity.com/">Deja vu Security</a> <br/>
Last updated 2014-02-23 21:23:59 PST
</td>
</table>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1094513-10']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www/') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</div>
</div>
</div>
</div>
</body>
</html>
